using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace GameUI {
	public class BlackController:MonoBehaviour {
		void Start() {
			SubscribeEvents();
		}

		void OnDestroy() {
			UnSubscribeEvents();
		}

		void SubscribeEvents() {
			UIController.Pause+=UIController_Pause;
			UIController.Unpause+=UIController_Unpause;
		}

		void UnSubscribeEvents() {
			UIController.Pause-=UIController_Pause;
			UIController.Unpause-=UIController_Unpause;
		}

		private void UIController_Unpause() { gameObject.SetActive(false); }

		private void UIController_Pause() { gameObject.SetActive(true); }
	}

}